#ifndef RFILESTREAM_H
#define RFILESTREAM_H

// CSharp includes.
#include <Defines.h>

// Riccsson includes.
#include <System/RCore.h>
#include <System/String.h>
#include <System/Array.h>
#include <System/Object.h>
#include <System/IntPtr.h>
#include <System/IO/Stream.h>
#include <System/IO/FileMode.h>
#include <System/IO/FileAccess.h>
#include <System/IO/FileShare.h>
#include <System/IO/FileOptions.h>
#include <System/IO/SeekOrigin.h>
#include <System/IO/FileSystemRights.h>

namespace Riccsson
{
	namespace System
	{
		namespace Collections
		{
			namespace Generic
			{
				template<typename T> class Task;
			}
		}
		namespace IO
		{
			class IAsyncResult;
			class SafeFileHandle;
			class AsyncCallback;
			class CancellationToken;
			class Task;
			class FileSecurity;

			// Summary:
			//     Exposes a System.IO.Stream around a file, supporting both synchronous and
			//     asynchronous read and write operations.
			class FileStream : public Stream
			{
			private:
#if Windows
				FILE* _internalStream;
#else
				//void* _internalStream;
				std::vector2<char> _internalVector;
#endif
				long _position;
				long _filesize;


				// Summary:
				//     Initializes a new instance of the System.IO.FileStream class for the specified
				//     file handle, with the specified read/write permission.
				//
				// Parameters:
				//   handle:
				//     A file handle for the file that the current FileStream object will encapsulate.
				//
				//   access:
				//     A constant that sets the System.IO.FileStream.CanRead and System.IO.FileStream.CanWrite
				//     properties of the FileStream object.
				//
				// Exceptions:
				//   System.ArgumentException:
				//     access is not a field of System.IO.FileAccess.
				//
				//   System.Security.SecurityException:
				//     The caller does not have the required permission.
				//
				//   System.IO.IOException:
				//     An I/O error, such as a disk error, occurred.-or-The stream has been closed.
				//
				//   System.UnauthorizedAccessException:
				//     The access requested is not permitted by the operating system for the specified
				//     file handle, such as when access is Write or ReadWrite and the file handle
				//     is set for read-only access.
				//[Obsolete("This constructor has been deprecated.  Please use new FileStream(SafeFileHandle handle, FileAccess access) instead.  http://go.microsoft.com/fwlink/?linkid=14202")]
				//public: FileStream(IntPtr* handle, FileAccess* access)
				//	: _position(0)
				//{
				//	throw;
				//}

				//
				// Summary:
				//     Initializes a new instance of the System.IO.FileStream class for the specified
				//     file handle, with the specified read/write permission.
				//
				// Parameters:
				//   handle:
				//     A file handle for the file that the current FileStream object will encapsulate.
				//
				//   access:
				//     A constant that sets the System.IO.FileStream.CanRead and System.IO.FileStream.CanWrite
				//     properties of the FileStream object.
				//
				// Exceptions:
				//   System.ArgumentException:
				//     access is not a field of System.IO.FileAccess.
				//
				//   System.Security.SecurityException:
				//     The caller does not have the required permission.
				//
				//   System.IO.IOException:
				//     An I/O error, such as a disk error, occurred.-or-The stream has been closed.
				//
				//   System.UnauthorizedAccessException:
				//     The access requested is not permitted by the operating system for the specified
				//     file handle, such as when access is Write or ReadWrite and the file handle
				//     is set for read-only access.
				//[SecuritySafeCritical]
				//public: FileStream(SafeFileHandle* handle, FileAccess* access)
				//	: _position(0)
				//{
				//	throw;
				//}

				//
				// Summary:
				//     Initializes a new instance of the System.IO.FileStream class with the specified
				//     path and creation mode.
				//
				// Parameters:
				//   path:
				//     A relative or absolute path for the file that the current FileStream object
				//     will encapsulate.
				//
				//   mode:
				//     A constant that determines how to open or create the file.
				//
				// Exceptions:
				//   System.ArgumentException:
				//     path is an empty string (""), contains only white space, or contains one
				//     or more invalid characters. -or-path refers to a non-file device, such as
				//     "con:", "com1:", "lpt1:", etc. in an NTFS environment.
				//
				//   System.NotSupportedException:
				//     path refers to a non-file device, such as "con:", "com1:", "lpt1:", etc.
				//     in a non-NTFS environment.
				//
				//   System.ArgumentNullException:
				//     path is null.
				//
				//   System.Security.SecurityException:
				//     The caller does not have the required permission.
				//
				//   System.IO.FileNotFoundException:
				//     The file cannot be found, such as when mode is FileMode.Truncate or FileMode.Open,
				//     and the file specified by path does not exist. The file must already exist
				//     in these modes.
				//
				//   System.IO.IOException:
				//     An I/O error, such as specifying FileMode.CreateNew when the file specified
				//     by path already exists, occurred.-or-The stream has been closed.
				//
				//   System.IO.DirectoryNotFoundException:
				//     The specified path is invalid, such as being on an unmapped drive.
				//
				//   System.IO.PathTooLongException:
				//     The specified path, file name, or both exceed the system-defined maximum
				//     length. For example, on Windows-based platforms, paths must be less than
				//     248 characters, and file names must be less than 260 characters.
				//
				//   System.ArgumentOutOfRangeException:
				//     mode contains an invalid value.
				//[SecuritySafeCritical]

				public: FileStream(string* path, FileMode mode);

				public: virtual ~FileStream();

				//
				// Summary:
				//     Initializes a new instance of the System.IO.FileStream class for the specified
				//     file handle, with the specified read/write permission and FileStream instance
				//     ownership.
				//
				// Parameters:
				//   handle:
				//     A file handle for the file that the current FileStream object will encapsulate.
				//
				//   access:
				//     A constant that gets the System.IO.FileStream.CanRead and System.IO.FileStream.CanWrite
				//     properties of the FileStream object.
				//
				//   ownsHandle:
				//     true if the file handle will be owned by this FileStream instance; otherwise,
				//     false.
				//
				// Exceptions:
				//   System.ArgumentException:
				//     access is not a field of System.IO.FileAccess.
				//
				//   System.Security.SecurityException:
				//     The caller does not have the required permission.
				//
				//   System.IO.IOException:
				//     An I/O error, such as a disk error, occurred.-or-The stream has been closed.
				//
				//   System.UnauthorizedAccessException:
				//     The access requested is not permitted by the operating system for the specified
				//     file handle, such as when access is Write or ReadWrite and the file handle
				//     is set for read-only access.
				//[Obsolete("This constructor has been deprecated.  Please use new FileStream(SafeFileHandle handle, FileAccess access) instead, and optionally make a new SafeFileHandle with ownsHandle=false if needed.  http://go.microsoft.com/fwlink/?linkid=14202")]
				public: FileStream(IntPtr handle, FileAccess access, bool ownsHandle)
					: _position(0)
				{
					throw;
				}

				//
				// Summary:
				//     Initializes a new instance of the System.IO.FileStream class for the specified
				//     file handle, with the specified read/write permission, and buffer size.
				//
				// Parameters:
				//   handle:
				//     A file handle for the file that the current FileStream object will encapsulate.
				//
				//   access:
				//     A System.IO.FileAccess constant that gets the System.IO.FileStream.CanRead
				//     and System.IO.FileStream.CanWrite properties of the FileStream object.
				//
				//   bufferSize:
				//     A positive System.Int32 value greater than 0 indicating the buffer size.
				//     For bufferSize values between one and eight, the actual buffer size is set
				//     to eight bytes.
				//
				// Exceptions:
				//   System.ArgumentException:
				//     The handle parameter is an invalid handle.-or-The handle parameter is a synchronous
				//     handle and it was used asynchronously.
				//
				//   System.ArgumentOutOfRangeException:
				//     The bufferSize parameter is negative.
				//
				//   System.IO.IOException:
				//     An I/O error, such as a disk error, occurred.-or-The stream has been closed.
				//
				//   System.Security.SecurityException:
				//     The caller does not have the required permission.
				//
				//   System.UnauthorizedAccessException:
				//     The access requested is not permitted by the operating system for the specified
				//     file handle, such as when access is Write or ReadWrite and the file handle
				//     is set for read-only access.
				//[SecuritySafeCritical]
				public: FileStream(SafeFileHandle* handle, FileAccess access, int bufferSize)
					: _position(0)
				{
					throw;
				}

				//
				// Summary:
				//     Initializes a new instance of the System.IO.FileStream class with the specified
				//     path, creation mode, and read/write permission.
				//
				// Parameters:
				//   path:
				//     A relative or absolute path for the file that the current FileStream object
				//     will encapsulate.
				//
				//   mode:
				//     A constant that determines how to open or create the file.
				//
				//   access:
				//     A constant that determines how the file can be accessed by the FileStream
				//     object. This gets the System.IO.FileStream.CanRead and System.IO.FileStream.CanWrite
				//     properties of the FileStream object. System.IO.FileStream.CanSeek is true
				//     if path specifies a disk file.
				//
				// Exceptions:
				//   System.ArgumentNullException:
				//     path is null.
				//
				//   System.ArgumentException:
				//     path is an empty string (""), contains only white space, or contains one
				//     or more invalid characters. -or-path refers to a non-file device, such as
				//     "con:", "com1:", "lpt1:", etc. in an NTFS environment.
				//
				//   System.NotSupportedException:
				//     path refers to a non-file device, such as "con:", "com1:", "lpt1:", etc.
				//     in a non-NTFS environment.
				//
				//   System.ArgumentException:
				//     path is an empty string (""), contains only white space, or contains one
				//     or more invalid characters.
				//
				//   System.IO.FileNotFoundException:
				//     The file cannot be found, such as when mode is FileMode.Truncate or FileMode.Open,
				//     and the file specified by path does not exist. The file must already exist
				//     in these modes.
				//
				//   System.IO.IOException:
				//     An I/O error, such as specifying FileMode.CreateNew when the file specified
				//     by path already exists, occurred. -or-The stream has been closed.
				//
				//   System.Security.SecurityException:
				//     The caller does not have the required permission.
				//
				//   System.IO.DirectoryNotFoundException:
				//     The specified path is invalid, such as being on an unmapped drive.
				//
				//   System.UnauthorizedAccessException:
				//     The access requested is not permitted by the operating system for the specified
				//     path, such as when access is Write or ReadWrite and the file or directory
				//     is set for read-only access.
				//
				//   System.IO.PathTooLongException:
				//     The specified path, file name, or both exceed the system-defined maximum
				//     length. For example, on Windows-based platforms, paths must be less than
				//     248 characters, and file names must be less than 260 characters.
				//
				//   System.ArgumentOutOfRangeException:
				//     mode contains an invalid value.
				//[SecuritySafeCritical]
				public: FileStream(string* path, FileMode mode, FileAccess access)
					: _position(0)
				{
					throw;
				}

				//
				// Summary:
				//     Initializes a new instance of the System.IO.FileStream class for the specified
				//     file handle, with the specified read/write permission, FileStream instance
				//     ownership, and buffer size.
				//
				// Parameters:
				//   handle:
				//     A file handle for the file that this FileStream object will encapsulate.
				//
				//   access:
				//     A constant that gets the System.IO.FileStream.CanRead and System.IO.FileStream.CanWrite
				//     properties of the FileStream object.
				//
				//   ownsHandle:
				//     true if the file handle will be owned by this FileStream instance; otherwise,
				//     false.
				//
				//   bufferSize:
				//     A positive System.Int32 value greater than 0 indicating the buffer size.
				//     For bufferSize values between one and eight, the actual buffer size is set
				//     to eight bytes.
				//
				// Exceptions:
				//   System.ArgumentOutOfRangeException:
				//     bufferSize is negative.
				//
				//   System.IO.IOException:
				//     An I/O error, such as a disk error, occurred.-or-The stream has been closed.
				//
				//   System.Security.SecurityException:
				//     The caller does not have the required permission.
				//
				//   System.UnauthorizedAccessException:
				//     The access requested is not permitted by the operating system for the specified
				//     file handle, such as when access is Write or ReadWrite and the file handle
				//     is set for read-only access.
				//[Obsolete("This constructor has been deprecated.  Please use new FileStream(SafeFileHandle handle, FileAccess access, int bufferSize) instead, and optionally make a new SafeFileHandle with ownsHandle=false if needed.  http://go.microsoft.com/fwlink/?linkid=14202")]
				public: FileStream(IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize)
					: _position(0)
				{
					throw;
				}

				//
				// Summary:
				//     Initializes a new instance of the System.IO.FileStream class for the specified
				//     file handle, with the specified read/write permission, buffer size, and synchronous
				//     or asynchronous state.
				//
				// Parameters:
				//   handle:
				//     A file handle for the file that this FileStream object will encapsulate.
				//
				//   access:
				//     A constant that gets the System.IO.FileStream.CanRead and System.IO.FileStream.CanWrite
				//     properties of the FileStream object.
				//
				//   bufferSize:
				//     A positive System.Int32 value greater than 0 indicating the buffer size.
				//     For bufferSize values between one and eight, the actual buffer size is set
				//     to eight bytes.
				//
				//   isAsync:
				//     true if the handle was opened asynchronously (that is, in overlapped I/O
				//     mode); otherwise, false.
				//
				// Exceptions:
				//   System.ArgumentException:
				//     The handle parameter is an invalid handle.-or-The handle parameter is a synchronous
				//     handle and it was used asynchronously.
				//
				//   System.ArgumentOutOfRangeException:
				//     The bufferSize parameter is negative.
				//
				//   System.IO.IOException:
				//     An I/O error, such as a disk error, occurred.-or-The stream has been closed.
				//
				//   System.Security.SecurityException:
				//     The caller does not have the required permission.
				//
				//   System.UnauthorizedAccessException:
				//     The access requested is not permitted by the operating system for the specified
				//     file handle, such as when access is Write or ReadWrite and the file handle
				//     is set for read-only access.
				//[SecuritySafeCritical]
				public: FileStream(SafeFileHandle* handle, FileAccess access, int bufferSize, bool isAsync)
					: _position(0)
				{
					throw;
				}

				//
				// Summary:
				//     Initializes a new instance of the System.IO.FileStream class with the specified
				//     path, creation mode, read/write permission, and sharing permission.
				//
				// Parameters:
				//   path:
				//     A relative or absolute path for the file that the current FileStream object
				//     will encapsulate.
				//
				//   mode:
				//     A constant that determines how to open or create the file.
				//
				//   access:
				//     A constant that determines how the file can be accessed by the FileStream
				//     object. This gets the System.IO.FileStream.CanRead and System.IO.FileStream.CanWrite
				//     properties of the FileStream object. System.IO.FileStream.CanSeek is true
				//     if path specifies a disk file.
				//
				//   share:
				//     A constant that determines how the file will be shared by processes.
				//
				// Exceptions:
				//   System.ArgumentNullException:
				//     path is null.
				//
				//   System.ArgumentException:
				//     path is an empty string (""), contains only white space, or contains one
				//     or more invalid characters. -or-path refers to a non-file device, such as
				//     "con:", "com1:", "lpt1:", etc. in an NTFS environment.
				//
				//   System.NotSupportedException:
				//     path refers to a non-file device, such as "con:", "com1:", "lpt1:", etc.
				//     in a non-NTFS environment.
				//
				//   System.ArgumentException:
				//     path is an empty string (""), contains only white space, or contains one
				//     or more invalid characters.
				//
				//   System.IO.FileNotFoundException:
				//     The file cannot be found, such as when mode is FileMode.Truncate or FileMode.Open,
				//     and the file specified by path does not exist. The file must already exist
				//     in these modes.
				//
				//   System.IO.IOException:
				//     An I/O error, such as specifying FileMode.CreateNew when the file specified
				//     by path already exists, occurred. -or-The system is running Windows 98 or
				//     Windows 98 Second Edition and share is set to FileShare.Delete.-or-The stream
				//     has been closed.
				//
				//   System.Security.SecurityException:
				//     The caller does not have the required permission.
				//
				//   System.IO.DirectoryNotFoundException:
				//     The specified path is invalid, such as being on an unmapped drive.
				//
				//   System.UnauthorizedAccessException:
				//     The access requested is not permitted by the operating system for the specified
				//     path, such as when access is Write or ReadWrite and the file or directory
				//     is set for read-only access.
				//
				//   System.IO.PathTooLongException:
				//     The specified path, file name, or both exceed the system-defined maximum
				//     length. For example, on Windows-based platforms, paths must be less than
				//     248 characters, and file names must be less than 260 characters.
				//
				//   System.ArgumentOutOfRangeException:
				//     mode contains an invalid value.
				//[SecuritySafeCritical]
				public: FileStream(string* path, FileMode mode, FileAccess access, FileShare share)
					: _position(0)
				{
					throw;
				}

				//
				// Summary:
				//     Initializes a new instance of the System.IO.FileStream class for the specified
				//     file handle, with the specified read/write permission, FileStream instance
				//     ownership, buffer size, and synchronous or asynchronous state.
				//
				// Parameters:
				//   handle:
				//     A file handle for the file that this FileStream object will encapsulate.
				//
				//   access:
				//     A constant that gets the System.IO.FileStream.CanRead and System.IO.FileStream.CanWrite
				//     properties of the FileStream object.
				//
				//   ownsHandle:
				//     true if the file handle will be owned by this FileStream instance; otherwise,
				//     false.
				//
				//   bufferSize:
				//     A positive System.Int32 value greater than 0 indicating the buffer size.
				//     For bufferSize values between one and eight, the actual buffer size is set
				//     to eight bytes.
				//
				//   isAsync:
				//     true if the handle was opened asynchronously (that is, in overlapped I/O
				//     mode); otherwise, false.
				//
				// Exceptions:
				//   System.ArgumentOutOfRangeException:
				//     access is less than FileAccess.Read or greater than FileAccess.ReadWrite
				//     or bufferSize is less than or equal to 0.
				//
				//   System.ArgumentException:
				//     The handle is invalid.
				//
				//   System.IO.IOException:
				//     An I/O error, such as a disk error, occurred.-or-The stream has been closed.
				//
				//   System.Security.SecurityException:
				//     The caller does not have the required permission.
				//
				//   System.UnauthorizedAccessException:
				//     The access requested is not permitted by the operating system for the specified
				//     file handle, such as when access is Write or ReadWrite and the file handle
				//     is set for read-only access.
				//[Obsolete("This constructor has been deprecated.  Please use new FileStream(SafeFileHandle handle, FileAccess access, int bufferSize, bool isAsync) instead, and optionally make a new SafeFileHandle with ownsHandle=false if needed.  http://go.microsoft.com/fwlink/?linkid=14202")]
				//[SecuritySafeCritical]
				public: FileStream(IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize, bool isAsync)
					: _position(0)
				{
					throw;
				}

				//
				// Summary:
				//     Initializes a new instance of the System.IO.FileStream class with the specified
				//     path, creation mode, read/write and sharing permission, and buffer size.
				//
				// Parameters:
				//   path:
				//     A relative or absolute path for the file that the current FileStream object
				//     will encapsulate.
				//
				//   mode:
				//     A constant that determines how to open or create the file.
				//
				//   access:
				//     A constant that determines how the file can be accessed by the FileStream
				//     object. This gets the System.IO.FileStream.CanRead and System.IO.FileStream.CanWrite
				//     properties of the FileStream object. System.IO.FileStream.CanSeek is true
				//     if path specifies a disk file.
				//
				//   share:
				//     A constant that determines how the file will be shared by processes.
				//
				//   bufferSize:
				//     A positive System.Int32 value greater than 0 indicating the buffer size.
				//     For bufferSize values between one and eight, the actual buffer size is set
				//     to eight bytes.
				//
				// Exceptions:
				//   System.ArgumentNullException:
				//     path is null.
				//
				//   System.ArgumentException:
				//     path is an empty string (""), contains only white space, or contains one
				//     or more invalid characters. -or-path refers to a non-file device, such as
				//     "con:", "com1:", "lpt1:", etc. in an NTFS environment.
				//
				//   System.NotSupportedException:
				//     path refers to a non-file device, such as "con:", "com1:", "lpt1:", etc.
				//     in a non-NTFS environment.
				//
				//   System.ArgumentException:
				//     path is an empty string (""), contains only white space, or contains one
				//     or more invalid characters.
				//
				//   System.ArgumentOutOfRangeException:
				//     bufferSize is negative or zero.-or- mode, access, or share contain an invalid
				//     value.
				//
				//   System.IO.FileNotFoundException:
				//     The file cannot be found, such as when mode is FileMode.Truncate or FileMode.Open,
				//     and the file specified by path does not exist. The file must already exist
				//     in these modes.
				//
				//   System.IO.IOException:
				//     An I/O error, such as specifying FileMode.CreateNew when the file specified
				//     by path already exists, occurred. -or-The system is running Windows 98 or
				//     Windows 98 Second Edition and share is set to FileShare.Delete.-or-The stream
				//     has been closed.
				//
				//   System.Security.SecurityException:
				//     The caller does not have the required permission.
				//
				//   System.IO.DirectoryNotFoundException:
				//     The specified path is invalid, such as being on an unmapped drive.
				//
				//   System.UnauthorizedAccessException:
				//     The access requested is not permitted by the operating system for the specified
				//     path, such as when access is Write or ReadWrite and the file or directory
				//     is set for read-only access.
				//
				//   System.IO.PathTooLongException:
				//     The specified path, file name, or both exceed the system-defined maximum
				//     length. For example, on Windows-based platforms, paths must be less than
				//     248 characters, and file names must be less than 260 characters.
				//[SecuritySafeCritical]
				public: FileStream(string* path, FileMode mode, FileAccess access, FileShare share, int bufferSize)
					: _position(0)
				{
					throw;
				}

				//
				// Summary:
				//     Initializes a new instance of the System.IO.FileStream class with the specified
				//     path, creation mode, read/write and sharing permission, buffer size, and
				//     synchronous or asynchronous state.
				//
				// Parameters:
				//   path:
				//     A relative or absolute path for the file that the current FileStream object
				//     will encapsulate.
				//
				//   mode:
				//     A constant that determines how to open or create the file.
				//
				//   access:
				//     A constant that determines how the file can be accessed by the FileStream
				//     object. This gets the System.IO.FileStream.CanRead and System.IO.FileStream.CanWrite
				//     properties of the FileStream object. System.IO.FileStream.CanSeek is true
				//     if path specifies a disk file.
				//
				//   share:
				//     A constant that determines how the file will be shared by processes.
				//
				//   bufferSize:
				//     A positive System.Int32 value greater than 0 indicating the buffer size.
				//     For bufferSize values between one and eight, the actual buffer size is set
				//     to eight bytes.
				//
				//   useAsync:
				//     Specifies whether to use asynchronous I/O or synchronous I/O. However, note
				//     that the underlying operating system might not support asynchronous I/O,
				//     so when specifying true, the handle might be opened synchronously depending
				//     on the platform. When opened asynchronously, the System.IO.FileStream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)
				//     and System.IO.FileStream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)
				//     methods perform better on large reads or writes, but they might be much slower
				//     for small reads or writes. If the application is designed to take advantage
				//     of asynchronous I/O, set the useAsync parameter to true. Using asynchronous
				//     I/O correctly can speed up applications by as much as a factor of 10, but
				//     using it without redesigning the application for asynchronous I/O can decrease
				//     performance by as much as a factor of 10.
				//
				// Exceptions:
				//   System.ArgumentNullException:
				//     path is null.
				//
				//   System.ArgumentException:
				//     path is an empty string (""), contains only white space, or contains one
				//     or more invalid characters. -or-path refers to a non-file device, such as
				//     "con:", "com1:", "lpt1:", etc. in an NTFS environment.
				//
				//   System.NotSupportedException:
				//     path refers to a non-file device, such as "con:", "com1:", "lpt1:", etc.
				//     in a non-NTFS environment.
				//
				//   System.ArgumentOutOfRangeException:
				//     bufferSize is negative or zero.-or- mode, access, or share contain an invalid
				//     value.
				//
				//   System.IO.FileNotFoundException:
				//     The file cannot be found, such as when mode is FileMode.Truncate or FileMode.Open,
				//     and the file specified by path does not exist. The file must already exist
				//     in these modes.
				//
				//   System.IO.IOException:
				//     An I/O error, such as specifying FileMode.CreateNew when the file specified
				//     by path already exists, occurred.-or- The system is running Windows 98 or
				//     Windows 98 Second Edition and share is set to FileShare.Delete.-or-The stream
				//     has been closed.
				//
				//   System.Security.SecurityException:
				//     The caller does not have the required permission.
				//
				//   System.IO.DirectoryNotFoundException:
				//     The specified path is invalid, such as being on an unmapped drive.
				//
				//   System.UnauthorizedAccessException:
				//     The access requested is not permitted by the operating system for the specified
				//     path, such as when access is Write or ReadWrite and the file or directory
				//     is set for read-only access.
				//
				//   System.IO.PathTooLongException:
				//     The specified path, file name, or both exceed the system-defined maximum
				//     length. For example, on Windows-based platforms, paths must be less than
				//     248 characters, and file names must be less than 260 characters.
				//[SecuritySafeCritical]
				public: FileStream(string* path, FileMode mode, FileAccess access, FileShare share, int bufferSize, bool useAsync)
					: _position(0)
				{
					throw;
				}

				//
				// Summary:
				//     Initializes a new instance of the System.IO.FileStream class with the specified
				//     path, creation mode, read/write and sharing permission, the access other
				//     FileStreams can have to the same file, the buffer size, and additional file
				//     options.
				//
				// Parameters:
				//   path:
				//     A relative or absolute path for the file that the current FileStream object
				//     will encapsulate.
				//
				//   mode:
				//     A constant that determines how to open or create the file.
				//
				//   access:
				//     A constant that determines how the file can be accessed by the FileStream
				//     object. This gets the System.IO.FileStream.CanRead and System.IO.FileStream.CanWrite
				//     properties of the FileStream object. System.IO.FileStream.CanSeek is true
				//     if path specifies a disk file.
				//
				//   share:
				//     A constant that determines how the file will be shared by processes.
				//
				//   bufferSize:
				//     A positive System.Int32 value greater than 0 indicating the buffer size.
				//     For bufferSize values between one and eight, the actual buffer size is set
				//     to eight bytes.
				//
				//   options:
				//     A value that specifies additional file options.
				//
				// Exceptions:
				//   System.ArgumentNullException:
				//     path is null.
				//
				//   System.ArgumentException:
				//     path is an empty string (""), contains only white space, or contains one
				//     or more invalid characters. -or-path refers to a non-file device, such as
				//     "con:", "com1:", "lpt1:", etc. in an NTFS environment.
				//
				//   System.NotSupportedException:
				//     path refers to a non-file device, such as "con:", "com1:", "lpt1:", etc.
				//     in a non-NTFS environment.
				//
				//   System.ArgumentOutOfRangeException:
				//     bufferSize is negative or zero.-or- mode, access, or share contain an invalid
				//     value.
				//
				//   System.IO.FileNotFoundException:
				//     The file cannot be found, such as when mode is FileMode.Truncate or FileMode.Open,
				//     and the file specified by path does not exist. The file must already exist
				//     in these modes.
				//
				//   System.IO.IOException:
				//     An I/O error, such as specifying FileMode.CreateNew when the file specified
				//     by path already exists, occurred.-or-The stream has been closed.
				//
				//   System.Security.SecurityException:
				//     The caller does not have the required permission.
				//
				//   System.IO.DirectoryNotFoundException:
				//     The specified path is invalid, such as being on an unmapped drive.
				//
				//   System.UnauthorizedAccessException:
				//     The access requested is not permitted by the operating system for the specified
				//     path, such as when access is Write or ReadWrite and the file or directory
				//     is set for read-only access. -or-System.IO.FileOptions.Encrypted is specified
				//     for options, but file encryption is not supported on the current platform.
				//
				//   System.IO.PathTooLongException:
				//     The specified path, file name, or both exceed the system-defined maximum
				//     length. For example, on Windows-based platforms, paths must be less than
				//     248 characters, and file names must be less than 260 characters.
				//[SecuritySafeCritical]
				public: FileStream(string* path, FileMode mode, FileAccess access, FileShare share, int bufferSize, FileOptions options)
					: _position(0)
				{
					throw;
				}

				//
				// Summary:
				//     Initializes a new instance of the System.IO.FileStream class with the specified
				//     path, creation mode, access rights and sharing permission, the buffer size,
				//     and additional file options.
				//
				// Parameters:
				//   path:
				//     A relative or absolute path for the file that the current System.IO.FileStream
				//     object will encapsulate.
				//
				//   mode:
				//     A constant that determines how to open or create the file.
				//
				//   rights:
				//     A constant that determines the access rights to use when creating access
				//     and audit rules for the file.
				//
				//   share:
				//     A constant that determines how the file will be shared by processes.
				//
				//   bufferSize:
				//     A positive System.Int32 value greater than 0 indicating the buffer size.
				//     For bufferSize values between one and eight, the actual buffer size is set
				//     to eight bytes.
				//
				//   options:
				//     A constant that specifies additional file options.
				//
				// Exceptions:
				//   System.ArgumentNullException:
				//     path is null.
				//
				//   System.ArgumentException:
				//     path is an empty string (""), contains only white space, or contains one
				//     or more invalid characters. -or-path refers to a non-file device, such as
				//     "con:", "com1:", "lpt1:", etc. in an NTFS environment.
				//
				//   System.NotSupportedException:
				//     path refers to a non-file device, such as "con:", "com1:", "lpt1:", etc.
				//     in a non-NTFS environment.
				//
				//   System.ArgumentOutOfRangeException:
				//     bufferSize is negative or zero.-or- mode, access, or share contain an invalid
				//     value.
				//
				//   System.IO.FileNotFoundException:
				//     The file cannot be found, such as when mode is FileMode.Truncate or FileMode.Open,
				//     and the file specified by path does not exist. The file must already exist
				//     in these modes.
				//
				//   System.PlatformNotSupportedException:
				//     The current operating system is not Windows NT or later.
				//
				//   System.IO.IOException:
				//     An I/O error, such as specifying FileMode.CreateNew when the file specified
				//     by path already exists, occurred. -or-The stream has been closed.
				//
				//   System.Security.SecurityException:
				//     The caller does not have the required permission.
				//
				//   System.IO.DirectoryNotFoundException:
				//     The specified path is invalid, such as being on an unmapped drive.
				//
				//   System.UnauthorizedAccessException:
				//     The access requested is not permitted by the operating system for the specified
				//     path, such as when access is Write or ReadWrite and the file or directory
				//     is set for read-only access. -or-System.IO.FileOptions.Encrypted is specified
				//     for options, but file encryption is not supported on the current platform.
				//
				//   System.IO.PathTooLongException:
				//     The specified path, file name, or both exceed the system-defined maximum
				//     length. For example, on Windows-based platforms, paths must be less than
				//     248 characters, and file names must be less than 260 characters.
				//[SecuritySafeCritical]
				public: FileStream(string* path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, FileOptions options)
					: _position(0)
				{
					throw;
				}

				//
				// Summary:
				//     Initializes a new instance of the System.IO.FileStream class with the specified
				//     path, creation mode, access rights and sharing permission, the buffer size,
				//     additional file options, access control and audit security.
				//
				// Parameters:
				//   path:
				//     A relative or absolute path for the file that the current System.IO.FileStream
				//     object will encapsulate.
				//
				//   mode:
				//     A constant that determines how to open or create the file.
				//
				//   rights:
				//     A constant that determines the access rights to use when creating access
				//     and audit rules for the file.
				//
				//   share:
				//     A constant that determines how the file will be shared by processes.
				//
				//   bufferSize:
				//     A positive System.Int32 value greater than 0 indicating the buffer size.
				//     For bufferSize values between one and eight, the actual buffer size is set
				//     to eight bytes.
				//
				//   options:
				//     A constant that specifies additional file options.
				//
				//   fileSecurity:
				//     A constant that determines the access control and audit security for the
				//     file.
				//
				// Exceptions:
				//   System.ArgumentNullException:
				//     path is null.
				//
				//   System.ArgumentException:
				//     path is an empty string (""), contains only white space, or contains one
				//     or more invalid characters. -or-path refers to a non-file device, such as
				//     "con:", "com1:", "lpt1:", etc. in an NTFS environment.
				//
				//   System.NotSupportedException:
				//     path refers to a non-file device, such as "con:", "com1:", "lpt1:", etc.
				//     in a non-NTFS environment.
				//
				//   System.ArgumentOutOfRangeException:
				//     bufferSize is negative or zero.-or- mode, access, or share contain an invalid
				//     value.
				//
				//   System.IO.FileNotFoundException:
				//     The file cannot be found, such as when mode is FileMode.Truncate or FileMode.Open,
				//     and the file specified by path does not exist. The file must already exist
				//     in these modes.
				//
				//   System.IO.IOException:
				//     An I/O error, such as specifying FileMode.CreateNew when the file specified
				//     by path already exists, occurred. -or-The stream has been closed.
				//
				//   System.Security.SecurityException:
				//     The caller does not have the required permission.
				//
				//   System.IO.DirectoryNotFoundException:
				//     The specified path is invalid, such as being on an unmapped drive.
				//
				//   System.UnauthorizedAccessException:
				//     The access requested is not permitted by the operating system for the specified
				//     path, such as when access is Write or ReadWrite and the file or directory
				//     is set for read-only access. -or-System.IO.FileOptions.Encrypted is specified
				//     for options, but file encryption is not supported on the current platform.
				//
				//   System.IO.PathTooLongException:
				//     The specified path, file name, or both exceed the system-defined maximum
				//     length. For example, on Windows-based platforms, paths must be less than
				//     248 characters, and file names must be less than 260 characters.
				//
				//   System.PlatformNotSupportedException:
				//     The current operating system is not Windows NT or later.
				//[SecuritySafeCritical]
				public: FileStream(string* path, FileMode mode, FileSystemRights rights, FileShare share, int bufferSize, FileOptions options, FileSecurity* fileSecurity)
					: _position(0)
				{
					throw;
				}

				// Summary:
				//     Gets a value indicating whether the current stream supports reading.
				//
				// Returns:
				//     true if the stream supports reading; false if the stream is closed or was
				//     opened with write-only access.
				public: override PROP3_GET(bool, CanRead)
				{
					throw;
				}
				private: PROP3_SET(bool, CanRead){throw;}

				//
				// Summary:
				//     Gets a value indicating whether the current stream supports seeking.
				//
				// Returns:
				//     true if the stream supports seeking; false if the stream is closed or if
				//     the FileStream was constructed from an operating-system handle such as a
				//     pipe or output to the console.
				//public: override bool CanSeek { get; }
				public: override PROP3_GET(bool, CanSeek)
				{
					throw;
				}
				private: PROP3_SET(bool, CanSeek){throw;}

				//
				// Summary:
				//     Gets a value indicating whether the current stream supports writing.
				//
				// Returns:
				//     true if the stream supports writing; false if the stream is closed or was
				//     opened with read-only access.
				//public: override bool CanWrite { get; }
				public: override PROP3_GET(bool, CanWrite)
				{
					throw;
				}
				private: PROP3_SET(bool, CanWrite){throw;}
				//
				// Summary:
				//     Gets the operating system file handle for the file that the current FileStream
				//     object encapsulates.
				//
				// Returns:
				//     The operating system file handle for the file encapsulated by this FileStream
				//     object, or -1 if the FileStream has been closed.
				//
				// Exceptions:
				//   System.Security.SecurityException:
				//     The caller does not have the required permission.
				//[Obsolete("This property has been deprecated.  Please use FileStream's SafeFileHandle property instead.  http://go.microsoft.com/fwlink/?linkid=14202")]
				//public: virtual IntPtr Handle { get; }
				public: override PROP3_GET(IntPtr, Handle)
				{
					throw;
				}
				private: PROP3_SET(IntPtr, Handle){throw;}
				//
				// Summary:
				//     Gets a value indicating whether the FileStream was opened asynchronously
				//     or synchronously.
				//
				// Returns:
				//     true if the FileStream was opened asynchronously; otherwise, false.
				//public: virtual bool IsAsync { get; }
				public: override PROP3_GET(bool, IsAsync)
				{
					throw;
				}
				private: PROP3_SET(bool, IsAsync){throw;}
				//
				// Summary:
				//     Gets the length in bytes of the stream.
				//
				// Returns:
				//     A long value representing the length of the stream in bytes.
				//
				// Exceptions:
				//   System.NotSupportedException:
				//     System.IO.FileStream.CanSeek for this stream is false.
				//
				//   System.IO.IOException:
				//     An I/O error, such as the file being closed, occurred.
				//public: override long Length { get; }
				public: override PROP3_GET(long, Length);

				//
				// Summary:
				//     Gets the name of the FileStream that was passed to the constructor.
				//
				// Returns:
				//     A string that is the name of the FileStream.
				//public: string Name { get; }
				public: override PROP3_GET(GC_PTR<string>, Name)
				{
					throw;
				}
				private: PROP3_SET(GC_PTR<string>, Name){throw;}
				//
				// Summary:
				//     Gets or sets the current position of this stream.
				//
				// Returns:
				//     The current position of this stream.
				//
				// Exceptions:
				//   System.NotSupportedException:
				//     The stream does not support seeking.
				//
				//   System.IO.IOException:
				//     An I/O error occurred. - or -The position was set to a very large value beyond
				//     the end of the stream in Windows 98 or earlier.
				//
				//   System.ArgumentOutOfRangeException:
				//     Attempted to set the position to a negative value.
				//
				//   System.IO.EndOfStreamException:
				//     Attempted seeking past the end of a stream that does not support this.
				//public: override long Position { get; set; }
				public: override PROP3_GET(long, Position)
				{
					return _position;
				}
				private: override PROP3_SET(long, Position)
				{
					_position = value;
				}
				//
				// Summary:
				//     Gets a Microsoft.Win32.SafeHandles.SafeFileHandle object that represents
				//     the operating system file handle for the file that the current System.IO.FileStream
				//     object encapsulates.
				//
				// Returns:
				//     An object that represents the operating system file handle for the file that
				//     the current System.IO.FileStream object encapsulates.
				//public: virtual SafeFileHandle SafeFileHandle { get; }
				public: override PROP3_GET(GC_PTR<SafeFileHandle>, SafeFileHandle)
				{
					throw;
				}
				private: PROP3_SET(GC_PTR<SafeFileHandle>, SafeFileHandle){throw;}

				// Summary:
				//     Begins an asynchronous read operation. (Consider using System.IO.FileStream.ReadAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)
				//     instead; see the Remarks section.)
				//
				// Parameters:
				//   array:
				//     The buffer to read data into.
				//
				//   offset:
				//     The byte offset in array at which to begin reading.
				//
				//   numBytes:
				//     The maximum number of bytes to read.
				//
				//   userCallback:
				//     The method to be called when the asynchronous read operation is completed.
				//
				//   stateObject:
				//     A user-provided object that distinguishes this particular asynchronous read
				//     request from other requests.
				//
				// Returns:
				//     An object that references the asynchronous read.
				//
				// Exceptions:
				//   System.ArgumentException:
				//     The array length minus offset is less than numBytes.
				//
				//   System.ArgumentNullException:
				//     array is null.
				//
				//   System.ArgumentOutOfRangeException:
				//     offset or numBytes is negative.
				//
				//   System.IO.IOException:
				//     An asynchronous read was attempted past the end of the file.
				//[SecuritySafeCritical]
				public: override GC_PTR<IAsyncResult> BeginRead(Array<byte>* array, int offset, int numBytes, AsyncCallback* userCallback, object* stateObject)
				{
					throw;
				}

				//
				// Summary:
				//     Begins an asynchronous write operation. (Consider using System.IO.FileStream.WriteAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)
				//     instead; see the Remarks section.)
				//
				// Parameters:
				//   array:
				//     The buffer containing data to write to the current stream.
				//
				//   offset:
				//     The zero-based byte offset in array at which to begin copying bytes to the
				//     current stream.
				//
				//   numBytes:
				//     The maximum number of bytes to write.
				//
				//   userCallback:
				//     The method to be called when the asynchronous write operation is completed.
				//
				//   stateObject:
				//     A user-provided object that distinguishes this particular asynchronous write
				//     request from other requests.
				//
				// Returns:
				//     An object that references the asynchronous write.
				//
				// Exceptions:
				//   System.ArgumentException:
				//     array length minus offset is less than numBytes.
				//
				//   System.ArgumentNullException:
				//     array is null.
				//
				//   System.ArgumentOutOfRangeException:
				//     offset or numBytes is negative.
				//
				//   System.NotSupportedException:
				//     The stream does not support writing.
				//
				//   System.ObjectDisposedException:
				//     The stream is closed.
				//
				//   System.IO.IOException:
				//     An I/O error occurred.
				//[SecuritySafeCritical]
				public: override GC_PTR<IAsyncResult> BeginWrite(Array<byte>* array, int offset, int numBytes, AsyncCallback* userCallback, object* stateObject)
				{
					throw;
				}

				//
				// Summary:
				//     Releases the unmanaged resources used by the System.IO.FileStream and optionally
				//     releases the managed resources.
				//
				// Parameters:
				//   disposing:
				//     true to release both managed and unmanaged resources; false to release only
				//     unmanaged resources.
				//[SecuritySafeCritical]
				protected: override void Dispose(bool disposing);

				//
				// Summary:
				//     Waits for the pending asynchronous read operation to complete. (Consider
				//     using System.IO.FileStream.ReadAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)
				//     instead; see the Remarks section.)
				//
				// Parameters:
				//   asyncResult:
				//     The reference to the pending asynchronous request to wait for.
				//
				// Returns:
				//     The number of bytes read from the stream, between 0 and the number of bytes
				//     you requested. Streams only return 0 at the end of the stream, otherwise,
				//     they should block until at least 1 byte is available.
				//
				// Exceptions:
				//   System.ArgumentNullException:
				//     asyncResult is null.
				//
				//   System.ArgumentException:
				//     This System.IAsyncResult object was not created by calling System.IO.FileStream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)
				//     on this class.
				//
				//   System.InvalidOperationException:
				//     System.IO.FileStream.EndRead(System.IAsyncResult) is called multiple times.
				//
				//   System.IO.IOException:
				//     The stream is closed or an internal error has occurred.
				//[SecuritySafeCritical]
				public: override int EndRead(IAsyncResult* asyncResult)
				{
					throw;
				}

				//
				// Summary:
				//     Ends an asynchronous write operation and blocks until the I/O operation is
				//     complete. (Consider using System.IO.FileStream.WriteAsync(System.Byte[],System.Int32,System.Int32,System.Threading.CancellationToken)
				//     instead; see the Remarks section.)
				//
				// Parameters:
				//   asyncResult:
				//     The pending asynchronous I/O request.
				//
				// Exceptions:
				//   System.ArgumentNullException:
				//     asyncResult is null.
				//
				//   System.ArgumentException:
				//     This System.IAsyncResult object was not created by calling System.IO.Stream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)
				//     on this class.
				//
				//   System.InvalidOperationException:
				//     System.IO.FileStream.EndWrite(System.IAsyncResult) is called multiple times.
				//
				//   System.IO.IOException:
				//     The stream is closed or an internal error has occurred.
				//[SecuritySafeCritical]
				public: override void EndWrite(IAsyncResult* asyncResult)
				{
					throw;
				}

				//
				// Summary:
				//     Clears buffers for this stream and causes any buffered data to be written
				//     to the file.
				//
				// Exceptions:
				//   System.IO.IOException:
				//     An I/O error occurred.
				//
				//   System.ObjectDisposedException:
				//     The stream is closed.
				public: override void Flush()
				{
					throw;
				}

				//
				// Summary:
				//     Clears buffers for this stream and causes any buffered data to be written
				//     to the file, and also clears all intermediate file buffers.
				//
				// Parameters:
				//   flushToDisk:
				//     true to flush all intermediate file buffers; otherwise, false.
				//[SecuritySafeCritical]
				public: virtual void Flush(bool flushToDisk)
				{
					throw;
				}

				//
				// Summary:
				//     Asynchronously clears all buffers for this stream, causes any buffered data
				//     to be written to the underlying device, and monitors cancellation requests.
				//
				// Parameters:
				//   cancellationToken:
				//     The token to monitor for cancellation requests.
				//
				// Returns:
				//     A task that represents the asynchronous flush operation.
				//
				// Exceptions:
				//   System.ObjectDisposedException:
				//     The stream has been disposed.
				//[ComVisible(false)]
				//[SecuritySafeCritical]
				public: override GC_PTR<Task> FlushAsync(CancellationToken* cancellationToken)
				{
					throw;
				}

				//
				// Summary:
				//     Gets a System.Security.AccessControl.FileSecurity object that encapsulates
				//     the access control list (ACL) entries for the file described by the current
				//     System.IO.FileStream object.
				//
				// Returns:
				//     An object that encapsulates the access control settings for the file described
				//     by the current System.IO.FileStream object.
				//
				// Exceptions:
				//   System.ObjectDisposedException:
				//     The file is closed.
				//
				//   System.IO.IOException:
				//     An I/O error occurred while opening the file.
				//
				//   System.SystemException:
				//     The file could not be found.
				//
				//   System.UnauthorizedAccessException:
				//     This operation is not supported on the current platform.-or- The caller does
				//     not have the required permission.
				//[SecuritySafeCritical]
				public: GC_PTR<FileSecurity> GetAccessControl()
				{
					throw;
				}

				//
				// Summary:
				//     Prevents other processes from reading from or writing to the System.IO.FileStream.
				//
				// Parameters:
				//   position:
				//     The beginning of the range to lock. The value of this parameter must be equal
				//     to or greater than zero (0).
				//
				//   length:
				//     The range to be locked.
				//
				// Exceptions:
				//   System.ArgumentOutOfRangeException:
				//     position or length is negative.
				//
				//   System.ObjectDisposedException:
				//     The file is closed.
				//
				//   System.IO.IOException:
				//     The process cannot access the file because another process has locked a portion
				//     of the file.
				//[SecuritySafeCritical]
				public: virtual void Lock(long position, long length)
				{
					throw;
				}

				//
				// Summary:
				//     Reads a block of bytes from the stream and writes the data in a given buffer.
				//
				// Parameters:
				//   array:
				//     When this method returns, contains the specified byte array with the values
				//     between offset and (offset + count - 1) replaced by the bytes read from the
				//     current source.
				//
				//   offset:
				//     The byte offset in array at which the read bytes will be placed.
				//
				//   count:
				//     The maximum number of bytes to read.
				//
				// Returns:
				//     The total number of bytes read into the buffer. This might be less than the
				//     number of bytes requested if that number of bytes are not currently available,
				//     or zero if the end of the stream is reached.
				//
				// Exceptions:
				//   System.ArgumentNullException:
				//     array is null.
				//
				//   System.ArgumentOutOfRangeException:
				//     offset or count is negative.
				//
				//   System.NotSupportedException:
				//     The stream does not support reading.
				//
				//   System.IO.IOException:
				//     An I/O error occurred.
				//
				//   System.ArgumentException:
				//     offset and count describe an invalid range in array.
				//
				//   System.ObjectDisposedException:
				//     Methods were called after the stream was closed.
				//[SecuritySafeCritical]
				public: override int Read(Array<byte>* array, int offset, int count);
						
				public: override int Read(byte* array, int offset, int count);

				//
				// Summary:
				//     Asynchronously reads a sequence of bytes from the current stream, advances
				//     the position within the stream by the number of bytes read, and monitors
				//     cancellation requests.
				//
				// Parameters:
				//   buffer:
				//     The buffer to write the data into.
				//
				//   offset:
				//     The byte offset in buffer at which to begin writing data from the stream.
				//
				//   count:
				//     The maximum number of bytes to read.
				//
				//   cancellationToken:
				//     The token to monitor for cancellation requests.
				//
				// Returns:
				//     A task that represents the asynchronous read operation. The value of the
				//     TResult parameter contains the total number of bytes read into the buffer.
				//     The result value can be less than the number of bytes requested if the number
				//     of bytes currently available is less than the requested number, or it can
				//     be 0 (zero) if the end of the stream has been reached.
				//
				// Exceptions:
				//   System.ArgumentNullException:
				//     buffer is null.
				//
				//   System.ArgumentOutOfRangeException:
				//     offset or count is negative.
				//
				//   System.ArgumentException:
				//     The sum of offset and count is larger than the buffer length.
				//
				//   System.NotSupportedException:
				//     The stream does not support reading.
				//
				//   System.ObjectDisposedException:
				//     The stream has been disposed.
				//
				//   System.InvalidOperationException:
				//     The stream is currently in use by a previous read operation.
				//[ComVisible(false)]
				//[SecuritySafeCritical]
				public: override GC_PTR<Collections::Generic::Task<int>> ReadAsync(Array<byte>* buffer, int offset, int count, CancellationToken* cancellationToken)
				{
					throw;
				}

				//
				// Summary:
				//     Reads a byte from the file and advances the read position one byte.
				//
				// Returns:
				//     The byte, cast to an System.Int32, or -1 if the end of the stream has been
				//     reached.
				//
				// Exceptions:
				//   System.NotSupportedException:
				//     The current stream does not support reading.
				//
				//   System.ObjectDisposedException:
				//     The current stream is closed.
				//[SecuritySafeCritical]
				public: override int ReadByte();

				//
				// Summary:
				//     Sets the current position of this stream to the given value.
				//
				// Parameters:
				//   offset:
				//     The point relative to origin from which to begin seeking.
				//
				//   origin:
				//     Specifies the beginning, the end, or the current position as a reference
				//     point for origin, using a value of type System.IO.SeekOrigin.
				//
				// Returns:
				//     The new position in the stream.
				//
				// Exceptions:
				//   System.IO.IOException:
				//     An I/O error occurred.
				//
				//   System.NotSupportedException:
				//     The stream does not support seeking, such as if the FileStream is constructed
				//     from a pipe or console output.
				//
				//   System.ArgumentException:
				//     Seeking is attempted before the beginning of the stream.
				//
				//   System.ObjectDisposedException:
				//     Methods were called after the stream was closed.
				//[SecuritySafeCritical]
				public: override long Seek(long offset, SeekOrigin origin)
				{
					throw;
				}

				//
				// Summary:
				//     Applies access control list (ACL) entries described by a System.Security.AccessControl.FileSecurity
				//     object to the file described by the current System.IO.FileStream object.
				//
				// Parameters:
				//   fileSecurity:
				//     An object that describes an ACL entry to apply to the current file.
				//
				// Exceptions:
				//   System.ObjectDisposedException:
				//     The file is closed.
				//
				//   System.ArgumentNullException:
				//     The fileSecurity parameter is null.
				//
				//   System.SystemException:
				//     The file could not be found or modified.
				//
				//   System.UnauthorizedAccessException:
				//     The current process does not have access to open the file.
				//[SecuritySafeCritical]
				public: void SetAccessControl(FileSecurity* fileSecurity)
				{
					throw;
				}

				//
				// Summary:
				//     Sets the length of this stream to the given value.
				//
				// Parameters:
				//   value:
				//     The new length of the stream.
				//
				// Exceptions:
				//   System.IO.IOException:
				//     An I/O error has occurred.
				//
				//   System.NotSupportedException:
				//     The stream does not support both writing and seeking.
				//
				//   System.ArgumentOutOfRangeException:
				//     Attempted to set the value parameter to less than 0.
				//[SecuritySafeCritical]
				public: override void SetLength(long value)
				{
					throw;
				}

				//
				// Summary:
				//     Allows access by other processes to all or part of a file that was previously
				//     locked.
				//
				// Parameters:
				//   position:
				//     The beginning of the range to unlock.
				//
				//   length:
				//     The range to be unlocked.
				//
				// Exceptions:
				//   System.ArgumentOutOfRangeException:
				//     position or length is negative.
				//[SecuritySafeCritical]
				public: virtual void Unlock(long position, long length)
				{
					throw;
				}

				//
				// Summary:
				//     Writes a block of bytes to the file stream.
				//
				// Parameters:
				//   array:
				//     The buffer containing data to write to the stream.
				//
				//   offset:
				//     The zero-based byte offset in array from which to begin copying bytes to
				//     the stream.
				//
				//   count:
				//     The maximum number of bytes to write.
				//
				// Exceptions:
				//   System.ArgumentNullException:
				//     array is null.
				//
				//   System.ArgumentException:
				//     offset and count describe an invalid range in array.
				//
				//   System.ArgumentOutOfRangeException:
				//     offset or count is negative.
				//
				//   System.IO.IOException:
				//     An I/O error occurred. - or -Another thread may have caused an unexpected
				//     change in the position of the operating system's file handle.
				//
				//   System.ObjectDisposedException:
				//     The stream is closed.
				//
				//   System.NotSupportedException:
				//     The current stream instance does not support writing.
				//[SecuritySafeCritical]
				public: override void Write(Array<byte>* array, int offset, int count);

				//
				// Summary:
				//     Asynchronously writes a sequence of bytes to the current stream, advances
				//     the current position within this stream by the number of bytes written, and
				//     monitors cancellation requests.
				//
				// Parameters:
				//   buffer:
				//     The buffer to write data from.
				//
				//   offset:
				//     The zero-based byte offset in buffer from which to begin copying bytes to
				//     the stream.
				//
				//   count:
				//     The maximum number of bytes to write.
				//
				//   cancellationToken:
				//     The token to monitor for cancellation requests.
				//
				// Returns:
				//     A task that represents the asynchronous write operation.
				//
				// Exceptions:
				//   System.ArgumentNullException:
				//     buffer is null.
				//
				//   System.ArgumentOutOfRangeException:
				//     offset or count is negative.
				//
				//   System.ArgumentException:
				//     The sum of offset and count is larger than the buffer length.
				//
				//   System.NotSupportedException:
				//     The stream does not support writing.
				//
				//   System.ObjectDisposedException:
				//     The stream has been disposed.
				//
				//   System.InvalidOperationException:
				//     The stream is currently in use by a previous write operation.
				//[ComVisible(false)]
				//[SecuritySafeCritical]
				public: override GC_PTR<Task> WriteAsync(Array<byte>* buffer, int offset, int count, CancellationToken* cancellationToken)
				{
					throw;
				}

				//
				// Summary:
				//     Writes a byte to the current position in the file stream.
				//
				// Parameters:
				//   value:
				//     A byte to write to the stream.
				//
				// Exceptions:
				//   System.ObjectDisposedException:
				//     The stream is closed.
				//
				//   System.NotSupportedException:
				//     The stream does not support writing.
				//[SecuritySafeCritical]
				public: override void WriteByte(byte value)
				{
					throw;
				}
			};
		}
	}
}

#endif